import Layout from "@/pages/Layout";
import Login from "@/pages/Login";

import { createBrowserRouter } from "react-router-dom";

import { AuthRouter } from "../components/AuthRouter";
import Home from "../pages/Home";
import Article from "../pages/Article";
import Publish from "../pages/Publish";

const router = createBrowserRouter([
  {
    path: "/",
    element: (
      <AuthRouter>
        <Layout></Layout>
      </AuthRouter>
    ),
    children:[
      {
        path:'home',
        element:<Home></Home>
      },
      {
           path:'article',
        element:<Article></Article>
      }
      ,
      {
           path:'publish',
        element:<Publish/>
      }
    ]
  },
  {
    path: "/Login",
    element: <Login></Login>,
  },
]);

export default router;
